import {routerGetter} from '../../utils/router';
import {previewImage} from '../../common/service/page-service';
Component({
    properties: {
        blocks: {
            type: Array,
            default: null
        }
    },
    methods: {
        onLinkClick (event) {
            let link = event.currentTarget.dataset.link;
            if (link) {
                routerGetter().execute(link);
            }
        },

        onImageClick (event) {
            let image = event.currentTarget.dataset.image;
            console.log('===>', image);
            if (image) {
                previewImage({urls: [image]});
            }
        }
    }
});
